import type { AxiosRequestConfig } from "axios";

// 请求方法Promise中resolve的内容
export interface IResolve<T> {
  data: T;
  code: number;
  errcode: number | string;
  message: string; // PHP
  msg: string; // GO
  status: boolean;
  [propsName: string]: any;
}
export type TRequest = <T = any, R = Record<string, any>>(
  url: string,
  params?: R,
  config?: AxiosRequestConfig & {
    isMock?: boolean;
  }
) => Promise<IResolve<T>>;
